// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** addCategories POST /api/categories/addCategories */
export async function addCategoriesUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.addCategoriesUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString_>('/api/categories/addCategories', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** deleteCategory POST /api/categories/delete */
export async function deleteCategoryUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/categories/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** getCategories GET /api/categories/get/categories */
export async function getCategoriesUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseListCategories_>('/api/categories/get/categories', {
    method: 'GET',
    ...(options || {}),
  })
}

/** hotCategories GET /api/categories/hotCategories */
export async function hotCategoriesUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseListCategories_>('/api/categories/hotCategories', {
    method: 'GET',
    ...(options || {}),
  })
}

/** recordCategories POST /api/categories/record */
export async function recordCategoriesUsingPost(
  body: API.CategoriesAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/categories/record', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** listCategoriesByPage POST /api/categories/search/page */
export async function listCategoriesByPageUsingPost(
  body: API.CategoriesQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageCategories_>('/api/categories/search/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
